/********************************************************************
	created:	2012/02/16
	created:	16:2:2012   21:34
	filename: 	f:\The DataStruct and Algorithm\CSA\CommonAlgorithm\LinkList.h
	file path:	f:\The DataStruct and Algorithm\CSA\CommonAlgorithm
	file base:	LinkList
	file ext:	h
	author:		Boxerxiong
	
	purpose:	
*********************************************************************/

#ifndef _LINK_LIST_H_
#define _LINK_LIST_H_


#include <stdlib.h>

template<typename T>
class LinkNode
{
public:
	T data;
	LinkNode<T>* next;
};

template<typename T>
class LinkList
{
public:
	LinkList();

	bool Add(T data);
	bool Del(T data);

private:
	LinkNode<T>* _FindInlist(T data);
	LinkNode<T>* _FindInsertPos(T data);

private:
	LinkNode<T>* mHead;
	LinkNode<T>* mTail;

	int mNodeNum;
};



void TestLinkList();


#endif